package com.tms.project.tms.manage.service.impl;

import java.util.List;
import com.tms.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.tms.project.tms.manage.mapper.TeachingManageMapper;
import com.tms.project.tms.manage.domain.TeachingManage;
import com.tms.project.tms.manage.service.ITeachingManageService;
import com.tms.common.utils.text.Convert;

/**
 * 常规教学管理Service业务层处理
 * 
 * @author xyl
 * @date 2021-03-23
 */
@Service
public class TeachingManageServiceImpl implements ITeachingManageService 
{
    @Autowired
    private TeachingManageMapper teachingManageMapper;

    /**
     * 查询常规教学管理
     * 
     * @param teachingManageId 常规教学管理ID
     * @return 常规教学管理
     */
    @Override
    public TeachingManage selectTeachingManageById(Long teachingManageId)
    {
        return teachingManageMapper.selectTeachingManageById(teachingManageId);
    }

    /**
     * 查询常规教学管理列表
     * 
     * @param teachingManage 常规教学管理
     * @return 常规教学管理
     */
    @Override
    public List<TeachingManage> selectTeachingManageList(TeachingManage teachingManage)
    {
        return teachingManageMapper.selectTeachingManageList(teachingManage);
    }

    /**
     * 新增常规教学管理
     * 
     * @param teachingManage 常规教学管理
     * @return 结果
     */
    @Override
    public int insertTeachingManage(TeachingManage teachingManage)
    {
        teachingManage.setCreateTime(DateUtils.getNowDate());
        return teachingManageMapper.insertTeachingManage(teachingManage);
    }

    /**
     * 修改常规教学管理
     * 
     * @param teachingManage 常规教学管理
     * @return 结果
     */
    @Override
    public int updateTeachingManage(TeachingManage teachingManage)
    {
        teachingManage.setUpdateTime(DateUtils.getNowDate());
        return teachingManageMapper.updateTeachingManage(teachingManage);
    }

    /**
     * 删除常规教学管理对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteTeachingManageByIds(String ids)
    {
        return teachingManageMapper.deleteTeachingManageByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除常规教学管理信息
     * 
     * @param teachingManageId 常规教学管理ID
     * @return 结果
     */
    @Override
    public int deleteTeachingManageById(Long teachingManageId)
    {
        return teachingManageMapper.deleteTeachingManageById(teachingManageId);
    }
}
